package com.hunk.time.model;

import java.math.BigDecimal;

public class CartRule {

    //满减条件
    private BigDecimal conditionPrice;
    //满减价钱
    private BigDecimal discount;

    public CartRule(BigDecimal conditionPrice, BigDecimal discount) {
        if (conditionPrice == null || discount == null) throw new RuntimeException("满减条件和满减价钱不能为空");
        this.conditionPrice = conditionPrice;
        this.discount = discount;
    }

    public BigDecimal getConditionPrice() {
        return conditionPrice;
    }

    public void setConditionPrice(BigDecimal conditionPrice) {
        this.conditionPrice = conditionPrice;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }
}
